Invokes in parallel the specified action for each element in the source.
Namespace:
System.Linq
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Shared Sub ForAll(Of TSource) ( _
source As ParallelQuery(Of TSource), _
action As Action(Of TSource) _
) |
C# |
---|
public static void ForAll<TSource>(
ParallelQuery<TSource> source,
Action<TSource> action
)
|
Type Parameters
- TSource
- The type of elements of source.
Remarks
Exceptions
Exception | Condition |
---|
System..::.ArgumentNullException |
source or action is a null reference (Nothing in Visual Basic).
|
System..::.AggregateException |
One or more exceptions occurred during the evaluation of the query.
|
System..::.OperationCanceledException |
The query was canceled.
|
See Also